function InfoBox(opt_opts){ opt_opts=opt_opts||{}; google.maps.OverlayView.apply(this, arguments); this.content_=opt_opts.content||""; this.disableAutoPan_=opt_opts.disableAutoPan||false; this.maxWidth_=opt_opts.maxWidth||0; this.pixelOffset_=opt_opts.pixelOffset||new google.maps.Size(0, 0); this.position_=opt_opts.position||new google.maps.LatLng(0, 0); this.zIndex_=opt_opts.zIndex||null; this.boxClass_=opt_opts.boxClass||"infoBox"; this.boxStyle_=opt_opts.boxStyle||{}; this.closeBoxMargin_=opt_opts.closeBoxMargin||"2px"; this.closeBoxURL_=opt_opts.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif"; if(opt_opts.closeBoxURL===""){ this.closeBoxURL_=""; } this.infoBoxClearance_=opt_opts.infoBoxClearance||new google.maps.Size(1, 1); if(typeof opt_opts.visible==="undefined"){ if(typeof opt_opts.isHidden==="undefined"){ opt_opts.visible=true; }else{ opt_opts.visible = !opt_opts.isHidden; }} this.isHidden_ = !opt_opts.visible; this.alignBottom_=opt_opts.alignBottom||false; this.pane_=opt_opts.pane||"floatPane"; this.enableEventPropagation_=opt_opts.enableEventPropagation||false; this.div_=null; this.closeListener_=null; this.moveListener_=null; this.contextListener_=null; this.eventListeners_=null; this.fixedWidthSet_=null; } InfoBox.prototype=new google.maps.OverlayView(); InfoBox.prototype.createInfoBoxDiv_=function (){ var i; var events; var bw; var me=this; var cancelHandler=function (e){ e.cancelBubble=true; if(e.stopPropagation){ e.stopPropagation(); }}; var ignoreHandler=function (e){ e.returnValue=false; if(e.preventDefault){ e.preventDefault(); } if(!me.enableEventPropagation_){ cancelHandler(e); }}; if(!this.div_){ this.div_=document.createElement("div"); this.setBoxStyle_(); if(typeof this.content_.nodeType==="undefined"){ this.div_.innerHTML=this.getCloseBoxImg_() + this.content_; }else{ this.div_.innerHTML=this.getCloseBoxImg_(); this.div_.appendChild(this.content_); } this.getPanes()[this.pane_].appendChild(this.div_); this.addClickHandler_(); if(this.div_.style.width){ this.fixedWidthSet_=true; }else{ if(this.maxWidth_!==0&&this.div_.offsetWidth > this.maxWidth_){ this.div_.style.width=this.maxWidth_; this.div_.style.overflow="auto"; this.fixedWidthSet_=true; }else{ bw=this.getBoxWidths_(); this.div_.style.width=(this.div_.offsetWidth - bw.left - bw.right) + "px"; this.fixedWidthSet_=false; }} this.panBox_(this.disableAutoPan_); if(!this.enableEventPropagation_){ this.eventListeners_=[]; events=["mousedown", "mouseover", "mouseout", "mouseup", "click", "dblclick", "touchstart", "touchend", "touchmove"]; for (i=0; i < events.length; i++){ this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler)); } this.eventListeners_.push(google.maps.event.addDomListener(this.div_, "mouseover", function (e){ this.style.cursor="default"; })); } this.contextListener_=google.maps.event.addDomListener(this.div_, "contextmenu", ignoreHandler); google.maps.event.trigger(this, "domready"); }}; InfoBox.prototype.getCloseBoxImg_=function (){ var img=""; if(this.closeBoxURL_!==""){ img=" mapWidth){ xOffset=pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth; } if(this.alignBottom_){ if(pixPosition.y < (-iwOffsetY + padY + iwHeight)){ yOffset=pixPosition.y + iwOffsetY - padY - iwHeight; }else if((pixPosition.y + iwOffsetY + padY) > mapHeight){ yOffset=pixPosition.y + iwOffsetY + padY - mapHeight; }}else{ if(pixPosition.y < (-iwOffsetY + padY)){ yOffset=pixPosition.y + iwOffsetY - padY; }else if((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight){ yOffset=pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight; }} if(!(xOffset===0&&yOffset===0)){ var c=map.getCenter(); map.panBy(xOffset, yOffset); }} }}; InfoBox.prototype.setBoxStyle_=function (){ var i, boxStyle; if(this.div_){ this.div_.className=this.boxClass_; this.div_.style.cssText=""; boxStyle=this.boxStyle_; for (i in boxStyle){ if(boxStyle.hasOwnProperty(i)){ this.div_.style[i]=boxStyle[i]; }} this.div_.style.WebkitTransform="translateZ(0)"; if(typeof this.div_.style.opacity!=="undefined"&&this.div_.style.opacity!==""){ this.div_.style.MsFilter="\"progid:DXImageTransform.Microsoft.Alpha(Opacity=" + (this.div_.style.opacity * 100) + ")\""; this.div_.style.filter="alpha(opacity=" + (this.div_.style.opacity * 100) + ")"; } this.div_.style.position="absolute"; this.div_.style.visibility='hidden'; if(this.zIndex_!==null){ this.div_.style.zIndex=this.zIndex_; }} }; InfoBox.prototype.getBoxWidths_=function (){ var computedStyle; var bw={top: 0, bottom: 0, left: 0, right: 0}; var box=this.div_; if(document.defaultView&&document.defaultView.getComputedStyle){ computedStyle=box.ownerDocument.defaultView.getComputedStyle(box, ""); if(computedStyle){ bw.top=parseInt(computedStyle.borderTopWidth, 10)||0; bw.bottom=parseInt(computedStyle.borderBottomWidth, 10)||0; bw.left=parseInt(computedStyle.borderLeftWidth, 10)||0; bw.right=parseInt(computedStyle.borderRightWidth, 10)||0; }}else if(document.documentElement.currentStyle){ if(box.currentStyle){ bw.top=parseInt(box.currentStyle.borderTopWidth, 10)||0; bw.bottom=parseInt(box.currentStyle.borderBottomWidth, 10)||0; bw.left=parseInt(box.currentStyle.borderLeftWidth, 10)||0; bw.right=parseInt(box.currentStyle.borderRightWidth, 10)||0; }} return bw; }; InfoBox.prototype.onRemove=function (){ if(this.div_){ this.div_.parentNode.removeChild(this.div_); this.div_=null; }}; InfoBox.prototype.draw=function (){ this.createInfoBoxDiv_(); var pixPosition=this.getProjection().fromLatLngToDivPixel(this.position_); this.div_.style.left=(pixPosition.x + this.pixelOffset_.width) + "px"; if(this.alignBottom_){ this.div_.style.bottom=-(pixPosition.y + this.pixelOffset_.height) + "px"; }else{ this.div_.style.top=(pixPosition.y + this.pixelOffset_.height) + "px"; } if(this.isHidden_){ this.div_.style.visibility="hidden"; }else{ this.div_.style.visibility="visible"; }}; InfoBox.prototype.setOptions=function (opt_opts){ if(typeof opt_opts.boxClass!=="undefined"){ this.boxClass_=opt_opts.boxClass; this.setBoxStyle_(); } if(typeof opt_opts.boxStyle!=="undefined"){ this.boxStyle_=opt_opts.boxStyle; this.setBoxStyle_(); } if(typeof opt_opts.content!=="undefined"){ this.setContent(opt_opts.content); } if(typeof opt_opts.disableAutoPan!=="undefined"){ this.disableAutoPan_=opt_opts.disableAutoPan; } if(typeof opt_opts.maxWidth!=="undefined"){ this.maxWidth_=opt_opts.maxWidth; } if(typeof opt_opts.pixelOffset!=="undefined"){ this.pixelOffset_=opt_opts.pixelOffset; } if(typeof opt_opts.alignBottom!=="undefined"){ this.alignBottom_=opt_opts.alignBottom; } if(typeof opt_opts.position!=="undefined"){ this.setPosition(opt_opts.position); } if(typeof opt_opts.zIndex!=="undefined"){ this.setZIndex(opt_opts.zIndex); } if(typeof opt_opts.closeBoxMargin!=="undefined"){ this.closeBoxMargin_=opt_opts.closeBoxMargin; } if(typeof opt_opts.closeBoxURL!=="undefined"){ this.closeBoxURL_=opt_opts.closeBoxURL; } if(typeof opt_opts.infoBoxClearance!=="undefined"){ this.infoBoxClearance_=opt_opts.infoBoxClearance; } if(typeof opt_opts.isHidden!=="undefined"){ this.isHidden_=opt_opts.isHidden; } if(typeof opt_opts.visible!=="undefined"){ this.isHidden_ = !opt_opts.visible; } if(typeof opt_opts.enableEventPropagation!=="undefined"){ this.enableEventPropagation_=opt_opts.enableEventPropagation; } if(this.div_){ this.draw(); }}; InfoBox.prototype.setContent=function (content){ this.content_=content; if(this.div_){ if(this.closeListener_){ google.maps.event.removeListener(this.closeListener_); this.closeListener_=null; } if(!this.fixedWidthSet_){ this.div_.style.width=""; } if(typeof content.nodeType==="undefined"){ this.div_.innerHTML=this.getCloseBoxImg_() + content; }else{ this.div_.innerHTML=this.getCloseBoxImg_(); this.div_.appendChild(content); } if(!this.fixedWidthSet_){ this.div_.style.width=this.div_.offsetWidth + "px"; if(typeof content.nodeType==="undefined"){ this.div_.innerHTML=this.getCloseBoxImg_() + content; }else{ this.div_.innerHTML=this.getCloseBoxImg_(); this.div_.appendChild(content); }} this.addClickHandler_(); } google.maps.event.trigger(this, "content_changed"); }; InfoBox.prototype.setPosition=function (latlng){ this.position_=latlng; if(this.div_){ this.draw(); } google.maps.event.trigger(this, "position_changed"); }; InfoBox.prototype.setZIndex=function (index){ this.zIndex_=index; if(this.div_){ this.div_.style.zIndex=index; } google.maps.event.trigger(this, "zindex_changed"); }; InfoBox.prototype.setVisible=function (isVisible){ this.isHidden_ = !isVisible; if(this.div_){ this.div_.style.visibility=(this.isHidden_ ? "hidden":"visible"); }}; InfoBox.prototype.getContent=function (){ return this.content_; }; InfoBox.prototype.getPosition=function (){ return this.position_; }; InfoBox.prototype.getZIndex=function (){ return this.zIndex_; }; InfoBox.prototype.getVisible=function (){ var isVisible; if((typeof this.getMap()==="undefined")||(this.getMap()===null)){ isVisible=false; }else{ isVisible = !this.isHidden_; } return isVisible; }; InfoBox.prototype.show=function (){ this.isHidden_=false; if(this.div_){ this.div_.style.visibility="visible"; }}; InfoBox.prototype.hide=function (){ this.isHidden_=true; if(this.div_){ this.div_.style.visibility="hidden"; }}; InfoBox.prototype.open=function (map, anchor){ var me=this; if(anchor){ this.position_=anchor.getPosition(); this.moveListener_=google.maps.event.addListener(anchor, "position_changed", function (){ me.setPosition(this.getPosition()); }); } this.setMap(map); if(this.div_){ this.panBox_(); }}; InfoBox.prototype.close=function (){ var i; if(this.closeListener_){ google.maps.event.removeListener(this.closeListener_); this.closeListener_=null; } if(this.eventListeners_){ for (i=0; i < this.eventListeners_.length; i++){ google.maps.event.removeListener(this.eventListeners_[i]); } this.eventListeners_=null; } if(this.moveListener_){ google.maps.event.removeListener(this.moveListener_); this.moveListener_=null; } if(this.contextListener_){ google.maps.event.removeListener(this.contextListener_); this.contextListener_=null; } this.setMap(null); }; var width,height; width=jQuery(window).width(); height=jQuery(window).height(); jQuery(window).resize(function(){ "use strict"; if(jQuery(window).width()!=width){ jQuery('#mobile_menu').hide('10'); }}); Number.prototype.format=function(n, x){ var re='\\d(?=(\\d{' + (x||3) + '})+' + (n > 0 ? '\\.':'$') + ')'; return this.toFixed(Math.max(0, ~~n)).replace(new RegExp(re, 'g'), '$&'+control_vars.price_separator); }; jQuery(document).ready(function ($){ "use strict"; var screen_width,screen_height; $('.list_sidebar_currency li').click(function(){ var ajaxurl,data,pos,symbol,coef,curpos; data=$(this).attr('data-value'); pos=$(this).attr('data-pos'); symbol=$(this).attr('data-symbol'); coef=$(this).attr('data-coef'); curpos=$(this).attr('data-curpos'); ajaxurl=ajaxcalls_vars.admin_url + 'admin-ajax.php'; jQuery.ajax({ type: 'POST', url: ajaxurl, data: { 'action':'wpestate_set_cookie_multiple_curr', 'curr':data, 'pos':pos, 'symbol':symbol, 'coef':coef, 'curpos':curpos, }, success: function (data){ location.reload(); }, error: function (errorThrown){}}); }); $('#map-view').click(function(event){ $('.map-type').fadeIn(400); }); $('.map-type').click(function(){ var map_type; $('.map-type').hide(); map_type=$(this).attr('id'); }); if(typeof enable_half_map_pin_action=='function'){ enable_half_map_pin_action(); } $('#pack_select').change(function(){ var stripe_pack_id,stripe_ammount,the_pick; $("#pack_select option:selected").each(function(){ stripe_pack_id=$(this).val(); stripe_ammount=parseFloat($(this).attr('data-price'))*100; the_pick=$(this).attr('data-pick'); }); $('#pack_id').val(stripe_pack_id); $('#pay_ammout').val(stripe_ammount); $('#stripe_form').attr('data-amount',stripe_ammount); $('.stripe_buttons').each(function(){ $(this).hide(); if($(this).attr('id')===the_pick){ $(this).show(); }}) }); $('#pack_recuring').click(function (){ if($(this).attr('checked')){ $('#stripe_form').append(''); }else{ $('#stripe_recuring').remove(); }}); $('.front_plan_row').click(function(event){ event.preventDefault(); $('.front_plan_row_image').slideUp(); $(this).next().slideDown(); }) $('.deleter_floor').click(function(){ $(this).parent().remove(); }) $('#adv_extended_options_text_adv ').click(function(){ $('.adv-search-1.adv_extended_class').css('height','auto'); $('.adv_extended_class .adv1-holder').css('height','auto'); $(this).parent().find('.adv_extended_options_text').hide(); $(this).parent().find('.extended_search_check_wrapper').slideDown(); $(this).parent().find('#adv_extended_close_adv').show(); }); $('#adv_extended_close_adv').click(function(){ $(this).parent().parent().find('.extended_search_check_wrapper').slideUp(); $(this).hide(); $(this).parent().parent().find('.adv_extended_options_text').show(); $('.adv-search-1.adv_extended_class').removeAttr('style'); $('.adv_extended_class .adv1-holder').removeAttr('style'); }); $('#adv_extended_options_text_widget').click(function(){ $(this).parent().find('.adv_extended_options_text').hide(); $(this).parent().find('.extended_search_check_wrapper').slideDown(); $(this).parent().find('#adv_extended_close_widget').show(); }); $('#adv_extended_close_widget').click(function(){ $(this).parent().parent().find('.extended_search_check_wrapper').slideUp(); $(this).hide(); $(this).parent().parent().find('.adv_extended_options_text').show(); }); $('#adv_extended_options_text_short').click(function(){ $(this).parent().find('.adv_extended_options_text').hide(); $(this).parent().find('.extended_search_check_wrapper').slideDown(); $(this).parent().find('#adv_extended_close_short').show(); }); $('#adv_extended_close_short').click(function(){ $(this).parent().parent().find('.extended_search_check_wrapper').slideUp(); $(this).hide(); $(this).parent().parent().find('.adv_extended_options_text').show(); }); $('#adv_extended_options_text_mobile').click(function(){ $(this).parent().find('.adv_extended_options_text').hide(); $(this).parent().find('.extended_search_check_wrapper').slideDown(); $(this).parent().find('#adv_extended_close_mobile').show(); }); $('#adv_extended_close_mobile').click(function(){ $(this).parent().parent().find('.extended_search_check_wrapper').slideUp(); $(this).hide(); $(this).parent().parent().find('.adv_extended_options_text').show(); }); $('.nav-prev,.nav-next ').click(function(event){ event.preventDefault(); var link=$(this).find('a').attr('href'); window.open (link,'_self',false) }) $('.featured_agent_details_wrapper, .agent-listing-img-wrapper').click(function(){ var newl=$(this).attr('data-link'); window.open (newl,'_self',false) }); $('.see_my_list_featured').click(function(event){ event.stopPropagation(); }); $('.featured_cover').click(function(){ var newl=$(this).attr('data-link'); window.open (newl,'_self',false) }); $('.agent_face').hover(function(){ $(this).find('.agent_face_details').fadeIn('500') }, function(){ $(this).find('.agent_face_details').fadeOut('500') } ); $('.property_listing, .agent_unit, .blog_unit , .featured_widget_image').click(function(){ var link; link=$(this).attr('data-link'); window.open(link, '_self'); }); $('.share_unit').click(function(event){ event.stopPropagation(); }); $('.related_blog_unit_image').click(function(){ var link; link=$(this).attr('data-related-link'); window.open(link, '_self'); }); $('#user_menu_u').click(function(event){ if($('#user_menu_open').is(":visible")){ $('#user_menu_open').removeClass('iosfixed').fadeOut(400); }else{ $('#user_menu_open').fadeIn(400); } event.stopPropagation(); }); $(document).click(function(event){ var clicka=event.target.id if(!$('#'+clicka).parents('.topmenux').length){ $('#user_menu_open').removeClass('iosfixed').hide(400); }}); jQuery('#imagelist i.fa-trash-o').click(function(){ var curent=''; jQuery(this).parent().remove(); jQuery('#imagelist .uploaded_images').each(function(){ curent=curent+','+jQuery(this).attr('data-imageid'); }); jQuery('#attachid').val(curent); }); jQuery('#imagelist img').dblclick(function(){ jQuery('#imagelist .uploaded_images .thumber').each(function(){ jQuery(this).remove(); }); jQuery(this).parent().append('') jQuery('#attachthumb').val(jQuery(this).parent().attr('data-imageid')); }); $('#switch').click(function (){ $('.main_wrapper').toggleClass('wide'); }); $('#accordion_prop_addr, #accordion_prop_details, #accordion_prop_features').on('shown.bs.collapse', function (){ $(this).find('h4').removeClass('carusel_closed'); }) $('#accordion_prop_addr, #accordion_prop_details, #accordion_prop_features').on('hidden.bs.collapse', function (){ $(this).find('h4').addClass('carusel_closed'); }) var elems=['#adv-search-3', '#adv-search-1', '#advanced_search_shortcode', '#adv-search-2', '#advanced_search_shortcode_2', '.adv-search-mobile','.advanced_search_sidebar']; $.each(elems, function(i, elem){ $(elem+' li').click(function (event){ event.preventDefault(); var pick, value, parent,parent_replace; parent_replace='.filter_menu_trigger'; if(elem==='.advanced_search_sidebar'){ parent_replace='.sidebar_filter_menu'; } pick=$(this).text(); value=$(this).attr('data-value'); parent=$(this).parent().parent(); parent.find(parent_replace).text(pick).append('').attr('data-value',value); parent.find('input').val(value); }); }); jQuery('#adv-search-1 li, #adv-search-3 li, .halfsearch input[type="checkbox"]').click(function (){ if(typeof (show_pins)!=="undefined"){ first_time_wpestate_show_inpage_ajax_half=1 show_pins(); }}); jQuery('#adv_rooms, #adv_bath, #price_low, #price_max, #adv-search-1 input[type=text], #adv-search-3 input[type=text]').change(function (){ if(typeof (show_pins)!=="undefined"){ first_time_wpestate_show_inpage_ajax_half=1 show_pins(); }}); function isFunction(possibleFunction){ return typeof(possibleFunction)===typeof(Function); } $('#showinpage,#showinpage_mobile').click(function (event){ event.preventDefault(); wpestate_show_inpage_ajax(); }); function wpestate_show_inpage_ajax(){ if($('#gmap-full').hasClass('spanselected')){ $('#gmap-full').trigger('click'); } if(mapfunctions_vars.custom_search==='yes'){ custom_search_start_filtering_ajax(1); }else{ start_filtering_ajax(1); }} $('#openmap').click(function(){ if($(this).find('i').hasClass('fa-angle-down')){ $(this).empty().append(''+control_vars.close_map); if(control_vars.show_adv_search_map_close==='no'){ $('.search_wrapper').addClass('adv1_close'); adv_search_click(); }}else{ $(this).empty().append(''+control_vars.open_map); } new_open_close_map(2); }); var wrap_h; var map_h; $('#gmap-full').click(function(){ if($('#gmap_wrapper').hasClass('fullmap')){ $('#google_map_prop_list_wrapper').removeClass('fullhalf'); $('#gmap_wrapper').removeClass('fullmap').css('height',wrap_h+'px'); $('#googleMap').removeClass('fullmap').css('height',map_h+'px'); $('#search_wrapper').removeClass('fullscreen_search'); $('#search_wrapper').removeClass('fullscreen_search_open'); $('.nav_wrapper').removeClass('hidden'); if(!$('#google_map_prop_list_wrapper').length){ $('.content_wrapper').show(); } $('body,html').animate({ scrollTop: 0 }, "slow"); $('#openmap').show(); $(this).empty().append(''+control_vars.fullscreen).removeClass('spanselected'); $('#google_map_prop_list_wrapper').removeClass('fullscreen'); $('#google_map_prop_list_sidebar').removeClass('fullscreen'); }else{ $('#google_map_prop_list_wrapper').addClass('fullscreen'); $('#google_map_prop_list_sidebar').addClass('fullscreen'); $('#google_map_prop_list_wrapper').addClass('fullhalf'); wrap_h=$('#gmap_wrapper').outerHeight(); map_h=$('#googleMap').outerHeight(); $('#gmap_wrapper,#googleMap').css('height','100%').addClass('fullmap'); $('#search_wrapper').addClass('fullscreen_search'); $('.nav_wrapper').addClass('hidden'); if(!$('#google_map_prop_list_wrapper').length){ $('.content_wrapper').hide(); } $('#openmap').hide(); $(this).empty().append(''+control_vars.default).addClass('spanselected'); } google.maps.event.trigger(map, "resize"); }); $('#street-view').click(function(){ toggleStreetView(); }); $('#slider_enable_map').click(function(){ var cur_lat, cur_long, myLatLng; $('#carousel-listing div').removeClass('slideron'); $('.vertical-wrapper,.verticalstatus ').hide(); $(this).addClass('slideron'); $('#googleMapSlider').show(); google.maps.event.trigger(map, "resize"); map.setOptions({draggable: true}); cur_lat=jQuery('#googleMapSlider').attr('data-cur_lat'); cur_long=jQuery('#googleMapSlider').attr('data-cur_long'); myLatLng=new google.maps.LatLng(cur_lat,cur_long); map.setCenter(myLatLng); map.panBy(10,-100); panorama.setVisible(false); $('#gmapzoomminus.smallslidecontrol').show(); $('#gmapzoomplus.smallslidecontrol').show(); }); $('#slider_enable_street').click(function(){ var cur_lat, cur_long, myLatLng; $('#carousel-listing div').removeClass('slideron'); $('.vertical-wrapper,.verticalstatus ').hide(); $(this).addClass('slideron'); cur_lat=jQuery('#googleMapSlider').attr('data-cur_lat'); cur_long=jQuery('#googleMapSlider').attr('data-cur_long'); myLatLng=new google.maps.LatLng(cur_lat,cur_long); $('#googleMapSlider').show(); panorama.setPosition(myLatLng); panorama.setVisible(true); $('#gmapzoomminus.smallslidecontrol').hide(); $('#gmapzoomplus.smallslidecontrol').hide(); }); $('#slider_enable_slider').click(function(){ $('#carousel-listing div').removeClass('slideron'); $(this).addClass('slideron'); $('.vertical-wrapper,.verticalstatus ').show(); $('#googleMapSlider').hide(); panorama.setVisible(false); $('#gmapzoomminus.smallslidecontrol').hide(); $('#gmapzoomplus.smallslidecontrol').hide(); }); $('.caption-wrapper').click(function(){ $(this).toggleClass('closed'); $('.carusel-back').toggleClass('rowclosed'); $('.post-carusel .carousel-indicators').toggleClass('rowclosed'); }); $('#carousel-listing').on('slid.bs.carousel', function (){ if($(this).hasClass('carouselvertical')){ show_capture_vertical(); }else{ show_capture(); } $('#carousel-listing div').removeClass('slideron'); $('#slider_enable_slider').addClass('slideron'); }) $('.carousel-round-indicators li').click(function(){ $('.carousel-round-indicators li').removeClass('active'); $(this).addClass('active'); }); $('.videoitem iframe').click(function(){ $('.estate_video_control').remove(); }); adv_search_click(); $('#adv-search-header-1').click(function(){ if(document.getElementById("adv_extended_options_text_adv")!==null){ $(this).parent().toggleClass('adv-search-1-close-extended'); }else{ $(this).parent().toggleClass('adv-search-1-close'); }}); $('#adv-search-header-3').click(function(){ $(this).parent().parent().toggleClass(' search_wrapper-close-extended'); }); $(".share_list, .icon-fav, .compare-action, .dashboad-tooltip").hover(function(){ $(this).tooltip('show') ; }, function(){ $(this).tooltip('hide'); } ); $('.share_list').click(function(event){ event.stopPropagation(); var sharediv=$(this).parent().find('.share_unit'); sharediv.toggle(); $(this).toggleClass('share_on'); }) $('.backtop').click(function(event){ event.preventDefault(); $('body,html').animate({ scrollTop: 0 }, "slow"); }) $('.contact-box ').click(function(event){ event.preventDefault(); $('.contactformwrapper').toggleClass('hidden'); contact_footer_starter(); }); $('#morg_compute').click(function(){ var intPayPer=0; var intMthPay=0; var intMthInt=0; var intPerFin=0; var intAmtFin=0; var intIntRate=0; var intAnnCost=0; var intVal=0; var salePrice=0; salePrice=$('#sale_price').val(); intPerFin=$('#percent_down').val() / 100; intAmtFin=salePrice - salePrice * intPerFin; intPayPer=parseInt ($('#term_years').val(),10) * 12; intIntRate=parseFloat ($('#interest_rate').val(),10); intMthInt=intIntRate / (12 * 100); intVal=raisePower(1 + intMthInt, -intPayPer); intMthPay=intAmtFin * (intMthInt / (1 - intVal)); intAnnCost=intMthPay * 12; $('#am_fin').html(""+control_vars.morg1+"
" + (Math.round(intAmtFin * 100)) / 100 + " "); $('#morgage_pay').html(""+control_vars.morg2+"
" + (Math.round(intMthPay * 100)) / 100 + " "); $('#anual_pay').html(""+control_vars.morg3+"
" + (Math.round(intAnnCost * 100)) / 100 + " "); $('#morg_results').show(); $('.mortgage_calculator_div').css('height',532+'px'); }); $("#geolocation-button").hover(function (){ $('#tooltip-geolocation').fadeIn(); $('.tooltip').fadeOut("fast"); }, function (){ $('#tooltip-geolocation').fadeOut(); } ); $('.extra_featured').change(function(){ var parent=$(this).parent(); var price_regular=parseFloat(parent.find('.submit-price-no').text(),10); var price_featured=parseFloat(parent.find('.submit-price-featured').text(),10); var total=price_regular+price_featured; if($(this).is(':checked')){ parent.find('.submit-price-total').text(total); parent.find('#stripe_form_featured').show(); parent.find('#stripe_form_simple').hide(); }else{ parent.find('.submit-price-total').text(price_regular); parent.find('#stripe_form_featured').hide(); parent.find('#stripe_form_simple').show(); }}); $('.compare_wrapper').each(function(){ var cols=$(this).find('.compare_item_head').length; $(this).addClass('compar-' + cols); }); $('#list_view').click(function(){ $(this).toggleClass('icon_selected'); $('#listing_ajax_container').addClass('ajax12'); $('#grid_view').toggleClass('icon_selected'); $('.listing_wrapper').hide().removeClass('col-md-4').removeClass('col-md-3').addClass('col-md-12').fadeIn(400) ; $('.the_grid_view').fadeOut(10,function(){ $('.the_list_view').fadeIn(300); }); }) $('#grid_view').click(function(){ var class_type; class_type=$('.listing_wrapper:first-of-type').attr('data-org'); $(this).toggleClass('icon_selected'); $('#listing_ajax_container').removeClass('ajax12'); $('#list_view').toggleClass('icon_selected'); $('.listing_wrapper ').hide().removeClass('col-md-12').addClass('col-md-'+class_type).fadeIn(400); $('.the_list_view').fadeOut(10,function(){ $('.the_grid_view').fadeIn(300); }); }) var already_in=[]; $('.compare-action').click(function(e){ e.preventDefault(); e.stopPropagation(); $('.prop-compare').show(); var post_id=$(this).attr('data-pid'); for(var i=0; i < already_in.length; i++){ if(already_in[i]===post_id){ return; }} already_in.push(post_id); var post_image=$(this).attr('data-pimage'); var to_add=''; $('div.items_compare:first-child').css('background', 'red'); if(parseInt($('.items_compare').length,10) > 3){ $('.items_compare:first').remove(); } $('#submit_compare').before(to_add); $('#submit_compare').click(function(){ $('#form_compare').trigger('submit'); }) $('.items_compare').fadeIn(500); }); $('#submit_compare').click(function(){ $('#form_compare').trigger('submit'); }) $('#form_submit_2,#form_submit_1 ').click(function(){ var loading_modal; window.scrollTo(0, 0); loading_modal=''; jQuery('body').append(loading_modal); jQuery('#loadingmodal').modal(); }); $('#add-new-image').click(function(){ $('

').appendTo('#files_area'); }) $('.delete_image').click(function(){ var image_id=$(this).attr('data-imageid'); var curent=$('#images_todelete').val(); if(curent===''){ curent=image_id; }else{ curent=curent+','+image_id; } $('#images_todelete').val(curent) ; $(this).parent().remove(); }); $('#googleMap').bind('mousemove', function(e){ $('.tooltip').css({'top':e.pageY,'left':e.pageX, 'z-index':'1'}); }); setTimeout(function(){ $('.tooltip').fadeOut("fast");},10000); }); function wpestate_filter_city_area(selected_city,selected_area){ jQuery('#'+selected_city+' li').click(function(event){ event.preventDefault(); var pick, value_city, parent, selected_city, is_city, area_value; value_city=String(jQuery(this).attr('data-value2')).toLowerCase(); jQuery('#'+selected_area+' li').each(function(){ is_city=String(jQuery(this).attr('data-parentcity')).toLowerCase(); is_city=is_city.replace(" ","-"); area_value=String(jQuery(this).attr('data-value')).toLowerCase(); if(is_city===value_city||value_city==='all'){ jQuery(this).show(); }else{ jQuery(this).hide(); }}); }); } function show_capture_vertical(){ "use strict"; var position, slideno, slidedif, tomove, curentleft, position; jQuery('#googleMapSlider').hide(); position=parseInt(jQuery('#carousel-listing .carousel-inner .active').index(),10); jQuery('#carousel-indicators-vertical li').removeClass('active'); jQuery('#carousel-listing .caption-wrapper span').removeClass('active'); jQuery("#carousel-listing .caption-wrapper span[data-slide-to='"+position+"'] ").addClass('active'); jQuery("#carousel-listing .caption-wrapper span[data-slide-to='"+position+"'] ").addClass('active'); jQuery("#carousel-indicators-vertical li[data-slide-to='"+position+"'] ").addClass('active'); slideno=position+1; slidedif=slideno*84; if(slidedif > 336){ tomove=336-slidedif; tomove=tomove; jQuery('#carousel-indicators-vertical').css('top',tomove+"px"); }else{ position=jQuery('#carousel-indicators-vertical').css('top',tomove+"px").position(); curentleft=position.top; if(curentleft < 0){ tomove=0; jQuery('#carousel-indicators-vertical').css('top',tomove+"px"); }} } function show_capture(){ "use strict"; var position, slideno, slidedif, tomove, curentleft, position; jQuery('#googleMapSlider').hide(); position=parseInt(jQuery('#carousel-listing .carousel-inner .active').index(),10); jQuery('#carousel-listing .caption-wrapper span').removeClass('active'); jQuery('#carousel-listing .carousel-round-indicators li').removeClass('active'); jQuery("#carousel-listing .caption-wrapper span[data-slide-to='"+position+"'] ").addClass('active'); jQuery("#carousel-listing .carousel-round-indicators li[data-slide-to='"+position+"'] ").addClass('active'); slideno=position+1; slidedif=slideno*146; if(slidedif > 810){ tomove=810-slidedif; jQuery('.post-carusel .carousel-indicators').css('left',tomove+"px"); }else{ position=jQuery('.post-carusel .carousel-indicators').css('left',tomove+"px").position(); curentleft=position.left; if(curentleft < 0){ tomove=0; jQuery('.post-carusel .carousel-indicators').css('left',tomove+"px"); }} } function raisePower(x, y){ return Math.pow(x, y); } function shortcode_google_map_load(containermap, lat, long, mapid){ "use strict"; var myCenter=new google.maps.LatLng(lat, long); var mapOptions={ flat:false, noClear:false, zoom: 15, scrollwheel: false, draggable: true, center: myCenter, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl:false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP] }, disableDefaultUI: true }; map=new google.maps.Map(document.getElementById(mapid), mapOptions); google.maps.visualRefresh=true; var marker=new google.maps.Marker({ position: myCenter, map: map }); marker.setMap(map); } function adv_search_click(){ jQuery('#adv-search-header-1').click(function(){ jQuery('#search_wrapper').toggleClass('fullscreen_search_open'); }); } function contact_footer_starter(){ jQuery('#btn-cont-submit').click(function (){ var contact_name, contact_email, contact_phone, contact_coment, agent_email, property_id, nonce, ajaxurl; contact_name=jQuery('#foot_contact_name').val(); contact_email=jQuery('#foot_contact_email').val(); contact_phone=jQuery('#foot_contact_phone').val(); contact_coment=jQuery('#foot_contact_content').val(); agent_email=jQuery('#foot_agent_email').val(); nonce=jQuery('#contact_footer_ajax_nonce').val(); ajaxurl=ajaxcalls_vars.admin_url + 'admin-ajax.php'; jQuery.ajax({ type: 'POST', dataType: 'json', url: ajaxurl, data: { 'action':'wpestate_ajax_contact_form_footer', 'name':contact_name, 'email':contact_email, 'phone':contact_phone, 'contact_coment':contact_coment, 'agentemail': agent_email, 'propid':property_id, 'nonce':nonce }, success: function (data){ if(data.sent){ jQuery('#foot_contact_name').val(''); jQuery('#foot_contact_email').val(''); jQuery('#foot_contact_phone').val(''); jQuery('#foot_contact_content').val(''); } jQuery('#footer_alert-agent-contact').empty().append(data.response); }, error: function (errorThrown){ }}); }); } function filter_invoices(){ "use strict"; var ajaxurl, start_date, end_date, type, status; start_date=jQuery('#invoice_start_date').val(); end_date=jQuery('#invoice_end_date').val(); type=jQuery('#invoice_type').val(); status=jQuery('#invoice_status').val(); ajaxurl=ajaxcalls_vars.admin_url + 'admin-ajax.php'; jQuery.ajax({ type: 'POST', url: ajaxurl, dataType: 'json', data: { 'action':'wpestate_ajax_filter_invoices', 'start_date':start_date, 'end_date':end_date, 'type':type, 'status':status }, success: function (data){ jQuery('#container-invoices').empty().append(data.results); jQuery('#invoice_confirmed').empty().append(data.invoice_confirmed); }, error: function (errorThrown){ }}); }; ; window.Modernizr=(function(window, document, undefined){ var version='2.6.2', Modernizr={}, enableClasses=true, docElement=document.documentElement, mod='modernizr', modElem=document.createElement(mod), mStyle=modElem.style, inputElem=document.createElement('input') , smile=':)', toString={}.toString, prefixes=' -webkit- -moz- -o- -ms- '.split(' '), omPrefixes='Webkit Moz O ms', cssomPrefixes=omPrefixes.split(' '), domPrefixes=omPrefixes.toLowerCase().split(' '), ns={'svg': 'http://www.w3.org/2000/svg'}, tests={}, inputs={}, attrs={}, classes=[], slice=classes.slice, featureName, injectElementWithStyles=function(rule, callback, nodes, testnames){ var style, ret, node, docOverflow, div=document.createElement('div'), body=document.body, fakeBody=body||document.createElement('body'); if(parseInt(nodes, 10)){ while(nodes--){ node=document.createElement('div'); node.id=testnames ? testnames[nodes]:mod + (nodes + 1); div.appendChild(node); }} style=['­',''].join(''); div.id=mod; (body ? div:fakeBody).innerHTML +=style; fakeBody.appendChild(div); if(!body){ fakeBody.style.background=''; fakeBody.style.overflow='hidden'; docOverflow=docElement.style.overflow; docElement.style.overflow='hidden'; docElement.appendChild(fakeBody); } ret=callback(div, rule); if(!body){ fakeBody.parentNode.removeChild(fakeBody); docElement.style.overflow=docOverflow; }else{ div.parentNode.removeChild(div); } return !!ret; }, testMediaQuery=function(mq){ var matchMedia=window.matchMedia||window.msMatchMedia; if(matchMedia){ return matchMedia(mq).matches; } var bool; injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; }}', function(node){ bool=(window.getComputedStyle ? getComputedStyle(node, null) : node.currentStyle)['position']=='absolute'; }); return bool; }, isEventSupported=(function(){ var TAGNAMES={ 'select': 'input', 'change': 'input', 'submit': 'form', 'reset': 'form', 'error': 'img', 'load': 'img', 'abort': 'img' }; function isEventSupported(eventName, element){ element=element||document.createElement(TAGNAMES[eventName]||'div'); eventName='on' + eventName; var isSupported=eventName in element; if(!isSupported){ if(!element.setAttribute){ element=document.createElement('div'); } if(element.setAttribute&&element.removeAttribute){ element.setAttribute(eventName, ''); isSupported=is(element[eventName], 'function'); if(!is(element[eventName], 'undefined')){ element[eventName]=undefined; } element.removeAttribute(eventName); }} element=null; return isSupported; } return isEventSupported; })(), _hasOwnProperty=({}).hasOwnProperty, hasOwnProp; if(!is(_hasOwnProperty, 'undefined')&&!is(_hasOwnProperty.call, 'undefined')){ hasOwnProp=function (object, property){ return _hasOwnProperty.call(object, property); };}else{ hasOwnProp=function (object, property){ return ((property in object)&&is(object.constructor.prototype[property], 'undefined')); };} if(!Function.prototype.bind){ Function.prototype.bind=function bind(that){ var target=this; if(typeof target!="function"){ throw new TypeError(); } var args=slice.call(arguments, 1), bound=function (){ if(this instanceof bound){ var F=function(){}; F.prototype=target.prototype; var self=new F(); var result=target.apply(self, args.concat(slice.call(arguments)) ); if(Object(result)===result){ return result; } return self; }else{ return target.apply(that, args.concat(slice.call(arguments)) ); }}; return bound; };} function setCss(str){ mStyle.cssText=str; } function setCssAll(str1, str2){ return setCss(prefixes.join(str1 + ';') +(str2||'')); } function is(obj, type){ return typeof obj===type; } function contains(str, substr){ return !!~('' + str).indexOf(substr); } function testProps(props, prefixed){ for(var i in props){ var prop=props[i]; if(!contains(prop, "-")&&mStyle[prop]!==undefined){ return prefixed=='pfx' ? prop:true; }} return false; } function testDOMProps(props, obj, elem){ for(var i in props){ var item=obj[props[i]]; if(item!==undefined){ if(elem===false) return props[i]; if(is(item, 'function')){ return item.bind(elem||obj); } return item; }} return false; } function testPropsAll(prop, prefixed, elem){ var ucProp=prop.charAt(0).toUpperCase() + prop.slice(1), props=(prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); if(is(prefixed, "string")||is(prefixed, "undefined")){ return testProps(props, prefixed); }else{ props=(prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); return testDOMProps(props, prefixed, elem); }} tests['flexbox']=function(){ return testPropsAll('flexWrap'); }; tests['canvas']=function(){ var elem=document.createElement('canvas'); return !!(elem.getContext&&elem.getContext('2d')); }; tests['canvastext']=function(){ return !!(Modernizr['canvas']&&is(document.createElement('canvas').getContext('2d').fillText, 'function')); }; tests['webgl']=function(){ return !!window.WebGLRenderingContext; }; tests['touch']=function(){ var bool; if(('ontouchstart' in window)||window.DocumentTouch&&document instanceof DocumentTouch){ bool=true; }else{ injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function(node){ bool=node.offsetTop===9; }); } return bool; }; tests['geolocation']=function(){ return 'geolocation' in navigator; }; tests['postmessage']=function(){ return !!window.postMessage; }; tests['websqldatabase']=function(){ return !!window.openDatabase; }; tests['indexedDB']=function(){ return !!testPropsAll("indexedDB", window); }; tests['hashchange']=function(){ return isEventSupported('hashchange', window)&&(document.documentMode===undefined||document.documentMode > 7); }; tests['history']=function(){ return !!(window.history&&history.pushState); }; tests['draganddrop']=function(){ var div=document.createElement('div'); return ('draggable' in div)||('ondragstart' in div&&'ondrop' in div); }; tests['websockets']=function(){ return 'WebSocket' in window||'MozWebSocket' in window; }; tests['rgba']=function(){ setCss('background-color:rgba(150,255,150,.5)'); return contains(mStyle.backgroundColor, 'rgba'); }; tests['hsla']=function(){ setCss('background-color:hsla(120,40%,100%,.5)'); return contains(mStyle.backgroundColor, 'rgba')||contains(mStyle.backgroundColor, 'hsla'); }; tests['multiplebgs']=function(){ setCss('background:url(https://),url(https://),red url(https://)'); return (/(url\s*\(.*?){3}/).test(mStyle.background); }; tests['backgroundsize']=function(){ return testPropsAll('backgroundSize'); }; tests['borderimage']=function(){ return testPropsAll('borderImage'); }; tests['borderradius']=function(){ return testPropsAll('borderRadius'); }; tests['boxshadow']=function(){ return testPropsAll('boxShadow'); }; tests['textshadow']=function(){ return document.createElement('div').style.textShadow===''; }; tests['opacity']=function(){ setCssAll('opacity:.55'); return (/^0.55$/).test(mStyle.opacity); }; tests['cssanimations']=function(){ return testPropsAll('animationName'); }; tests['csscolumns']=function(){ return testPropsAll('columnCount'); }; tests['cssgradients']=function(){ var str1='background-image:', str2='gradient(linear,left top,right bottom,from(#9f9),to(white));', str3='linear-gradient(left top,#9f9, white);'; setCss( (str1 + '-webkit- '.split(' ').join(str2 + str1) + prefixes.join(str3 + str1)).slice(0, -str1.length) ); return contains(mStyle.backgroundImage, 'gradient'); }; tests['cssreflections']=function(){ return testPropsAll('boxReflect'); }; tests['csstransforms']=function(){ return !!testPropsAll('transform'); }; tests['csstransforms3d']=function(){ var ret = !!testPropsAll('perspective'); if(ret&&'webkitPerspective' in docElement.style){ injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function(node, rule){ ret=node.offsetLeft===9&&node.offsetHeight===3; }); } return ret; }; tests['csstransitions']=function(){ return testPropsAll('transition'); }; tests['fontface']=function(){ var bool; injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule){ var style=document.getElementById('smodernizr'), sheet=style.sheet||style.styleSheet, cssText=sheet ? (sheet.cssRules&&sheet.cssRules[0] ? sheet.cssRules[0].cssText:sheet.cssText||''):''; bool=/src/i.test(cssText)&&cssText.indexOf(rule.split(' ')[0])===0; }); return bool; }; tests['generatedcontent']=function(){ var bool; injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function(node){ bool=node.offsetHeight >=3; }); return bool; }; tests['video']=function(){ var elem=document.createElement('video'), bool=false; try { if(bool = !!elem.canPlayType){ bool=new Boolean(bool); bool.ogg=elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); bool.h264=elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,''); bool.webm=elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); }} catch(e){ } return bool; }; tests['audio']=function(){ var elem=document.createElement('audio'), bool=false; try { if(bool = !!elem.canPlayType){ bool=new Boolean(bool); bool.ogg=elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); bool.mp3=elem.canPlayType('audio/mpeg;') .replace(/^no$/,''); bool.wav=elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); bool.m4a=(elem.canPlayType('audio/x-m4a;') || elem.canPlayType('audio/aac;')) .replace(/^no$/,''); }} catch(e){ } return bool; }; tests['localstorage']=function(){ try { localStorage.setItem(mod, mod); localStorage.removeItem(mod); return true; } catch(e){ return false; }}; tests['sessionstorage']=function(){ try { sessionStorage.setItem(mod, mod); sessionStorage.removeItem(mod); return true; } catch(e){ return false; }}; tests['webworkers']=function(){ return !!window.Worker; }; tests['applicationcache']=function(){ return !!window.applicationCache; }; tests['svg']=function(){ return !!document.createElementNS&&!!document.createElementNS(ns.svg, 'svg').createSVGRect; }; tests['inlinesvg']=function(){ var div=document.createElement('div'); div.innerHTML=''; return (div.firstChild&&div.firstChild.namespaceURI)==ns.svg; }; tests['smil']=function(){ return !!document.createElementNS&&/SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); }; tests['svgclippaths']=function(){ return !!document.createElementNS&&/SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); }; function webforms(){ Modernizr['input']=(function(props){ for(var i=0, len=props.length; i < len; i++){ attrs[ props[i] ] = !!(props[i] in inputElem); } if(attrs.list){ attrs.list = !!(document.createElement('datalist')&&window.HTMLDataListElement); } return attrs; })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); Modernizr['inputtypes']=(function(props){ for(var i=0, bool, inputElemType, defaultView, len=props.length; i < len; i++){ inputElem.setAttribute('type', inputElemType=props[i]); bool=inputElem.type!=='text'; if(bool){ inputElem.value=smile; inputElem.style.cssText='position:absolute;visibility:hidden;'; if(/^range$/.test(inputElemType)&&inputElem.style.WebkitAppearance!==undefined){ docElement.appendChild(inputElem); defaultView=document.defaultView; bool=defaultView.getComputedStyle && defaultView.getComputedStyle(inputElem, null).WebkitAppearance!=='textfield' && (inputElem.offsetHeight!==0); docElement.removeChild(inputElem); }else if(/^(search|tel)$/.test(inputElemType)){ }else if(/^(url|email)$/.test(inputElemType)){ bool=inputElem.checkValidity&&inputElem.checkValidity()===false; }else{ bool=inputElem.value!=smile; }} inputs[ props[i] ] = !!bool; } return inputs; })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); } for(var feature in tests){ if(hasOwnProp(tests, feature)){ featureName=feature.toLowerCase(); Modernizr[featureName]=tests[feature](); classes.push((Modernizr[featureName] ? '':'no-') + featureName); }} Modernizr.input||webforms(); Modernizr.addTest=function(feature, test){ if(typeof feature=='object'){ for(var key in feature){ if(hasOwnProp(feature, key)){ Modernizr.addTest(key, feature[ key ]); }} }else{ feature=feature.toLowerCase(); if(Modernizr[feature]!==undefined){ return Modernizr; } test=typeof test=='function' ? test():test; if(typeof enableClasses!=="undefined"&&enableClasses){ docElement.className +=' ' + (test ? '':'no-') + feature; } Modernizr[feature]=test; } return Modernizr; }; setCss(''); modElem=inputElem=null; ;(function(window, document){ var options=window.html5||{}; var reSkip=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; var saveClones=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; var supportsHtml5Styles; var expando='_html5shiv'; var expanID=0; var expandoData={}; var supportsUnknownElements; (function(){ try { var a=document.createElement('a'); a.innerHTML=''; supportsHtml5Styles=('hidden' in a); supportsUnknownElements=a.childNodes.length==1||(function(){ (document.createElement)('a'); var frag=document.createDocumentFragment(); return ( typeof frag.cloneNode=='undefined' || typeof frag.createDocumentFragment=='undefined' || typeof frag.createElement=='undefined' ); }()); } catch(e){ supportsHtml5Styles=true; supportsUnknownElements=true; }}()); function addStyleSheet(ownerDocument, cssText){ var p=ownerDocument.createElement('p'), parent=ownerDocument.getElementsByTagName('head')[0]||ownerDocument.documentElement; p.innerHTML='x'; return parent.insertBefore(p.lastChild, parent.firstChild); } function getElements(){ var elements=html5.elements; return typeof elements=='string' ? elements.split(' '):elements; } function getExpandoData(ownerDocument){ var data=expandoData[ownerDocument[expando]]; if(!data){ data={}; expanID++; ownerDocument[expando]=expanID; expandoData[expanID]=data; } return data; } function createElement(nodeName, ownerDocument, data){ if(!ownerDocument){ ownerDocument=document; } if(supportsUnknownElements){ return ownerDocument.createElement(nodeName); } if(!data){ data=getExpandoData(ownerDocument); } var node; if(data.cache[nodeName]){ node=data.cache[nodeName].cloneNode(); }else if(saveClones.test(nodeName)){ node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode(); }else{ node=data.createElem(nodeName); } return node.canHaveChildren&&!reSkip.test(nodeName) ? data.frag.appendChild(node):node; } function createDocumentFragment(ownerDocument, data){ if(!ownerDocument){ ownerDocument=document; } if(supportsUnknownElements){ return ownerDocument.createDocumentFragment(); } data=data||getExpandoData(ownerDocument); var clone=data.frag.cloneNode(), i=0, elems=getElements(), l=elems.length; for(;i (this.$items.length - 1)||pos < 0) return if(this.sliding) return this.$element.one('slid.bs.carousel', function (){ that.to(pos) }) if(activeIndex==pos) return this.pause().cycle() return this.slide(pos > activeIndex ? 'next':'prev', this.$items.eq(pos)) } Carousel.prototype.pause=function (e){ e||(this.paused=true) if(this.$element.find('.next, .prev').length&&$.support.transition){ this.$element.trigger($.support.transition.end) this.cycle(true) } this.interval=clearInterval(this.interval) return this } Carousel.prototype.next=function (){ if(this.sliding) return return this.slide('next') } Carousel.prototype.prev=function (){ if(this.sliding) return return this.slide('prev') } Carousel.prototype.slide=function (type, next){ var $active=this.$element.find('.item.active') var $next=next||this.getItemForDirection(type, $active) var isCycling=this.interval var direction=type=='next' ? 'left':'right' var that=this if($next.hasClass('active')) return (this.sliding=false) var relatedTarget=$next[0] var slideEvent=$.Event('slide.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) this.$element.trigger(slideEvent) if(slideEvent.isDefaultPrevented()) return this.sliding=true isCycling&&this.pause() if(this.$indicators.length){ this.$indicators.find('.active').removeClass('active') var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]) $nextIndicator&&$nextIndicator.addClass('active') } var slidEvent=$.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) if($.support.transition&&this.$element.hasClass('slide')){ $next.addClass(type) $next[0].offsetWidth $active.addClass(direction) $next.addClass(direction) $active .one('bsTransitionEnd', function (){ $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding=false setTimeout(function (){ that.$element.trigger(slidEvent) }, 0) }) .emulateTransitionEnd(Carousel.TRANSITION_DURATION) }else{ $active.removeClass('active') $next.addClass('active') this.sliding=false this.$element.trigger(slidEvent) } isCycling&&this.cycle() return this } function Plugin(option){ return this.each(function (){ var $this=$(this) var data=$this.data('bs.carousel') var options=$.extend({}, Carousel.DEFAULTS, $this.data(), typeof option=='object'&&option) var action=typeof option=='string' ? option:options.slide if(!data) $this.data('bs.carousel', (data=new Carousel(this, options))) if(typeof option=='number') data.to(option) else if(action) data[action]() else if(options.interval) data.pause().cycle() }) } var old=$.fn.carousel $.fn.carousel=Plugin $.fn.carousel.Constructor=Carousel $.fn.carousel.noConflict=function (){ $.fn.carousel=old return this } var clickHandler=function (e){ var href var $this=$(this) var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, '')) if(!$target.hasClass('carousel')) return var options=$.extend({}, $target.data(), $this.data()) var slideIndex=$this.attr('data-slide-to') if(slideIndex) options.interval=false Plugin.call($target, options) if(slideIndex){ $target.data('bs.carousel').to(slideIndex) } e.preventDefault() } $(document) .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) $(window).on('load', function (){ $('[data-ride="carousel"]').each(function (){ var $carousel=$(this) Plugin.call($carousel, $carousel.data()) }) }) }(jQuery); +function ($){ 'use strict'; var Collapse=function (element, options){ this.$element=$(element) this.options=$.extend({}, Collapse.DEFAULTS, options) this.$trigger=$('[data-toggle="collapse"][href="#' + element.id + '"],' + '[data-toggle="collapse"][data-target="#' + element.id + '"]') this.transitioning=null if(this.options.parent){ this.$parent=this.getParent() }else{ this.addAriaAndCollapsedClass(this.$element, this.$trigger) } if(this.options.toggle) this.toggle() } Collapse.VERSION='3.3.4' Collapse.TRANSITION_DURATION=350 Collapse.DEFAULTS={ toggle: true } Collapse.prototype.dimension=function (){ var hasWidth=this.$element.hasClass('width') return hasWidth ? 'width':'height' } Collapse.prototype.show=function (){ if(this.transitioning||this.$element.hasClass('in')) return var activesData var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing') if(actives&&actives.length){ activesData=actives.data('bs.collapse') if(activesData&&activesData.transitioning) return } var startEvent=$.Event('show.bs.collapse') this.$element.trigger(startEvent) if(startEvent.isDefaultPrevented()) return if(actives&&actives.length){ Plugin.call(actives, 'hide') activesData||actives.data('bs.collapse', null) } var dimension=this.dimension() this.$element .removeClass('collapse') .addClass('collapsing')[dimension](0) .attr('aria-expanded', true) this.$trigger .removeClass('collapsed') .attr('aria-expanded', true) this.transitioning=1 var complete=function (){ this.$element .removeClass('collapsing') .addClass('collapse in')[dimension]('') this.transitioning=0 this.$element .trigger('shown.bs.collapse') } if(!$.support.transition) return complete.call(this) var scrollSize=$.camelCase(['scroll', dimension].join('-')) this.$element .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide=function (){ if(this.transitioning||!this.$element.hasClass('in')) return var startEvent=$.Event('hide.bs.collapse') this.$element.trigger(startEvent) if(startEvent.isDefaultPrevented()) return var dimension=this.dimension() this.$element[dimension](this.$element[dimension]())[0].offsetHeight this.$element .addClass('collapsing') .removeClass('collapse in') .attr('aria-expanded', false) this.$trigger .addClass('collapsed') .attr('aria-expanded', false) this.transitioning=1 var complete=function (){ this.transitioning=0 this.$element .removeClass('collapsing') .addClass('collapse') .trigger('hidden.bs.collapse') } if(!$.support.transition) return complete.call(this) this.$element [dimension](0) .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(Collapse.TRANSITION_DURATION) } Collapse.prototype.toggle=function (){ this[this.$element.hasClass('in') ? 'hide':'show']() } Collapse.prototype.getParent=function (){ return $(this.options.parent) .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element){ var $element=$(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) }, this)) .end() } Collapse.prototype.addAriaAndCollapsedClass=function ($element, $trigger){ var isOpen=$element.hasClass('in') $element.attr('aria-expanded', isOpen) $trigger .toggleClass('collapsed', !isOpen) .attr('aria-expanded', isOpen) } function getTargetFromTrigger($trigger){ var href var target=$trigger.attr('data-target') || (href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, '') return $(target) } function Plugin(option){ return this.each(function (){ var $this=$(this) var data=$this.data('bs.collapse') var options=$.extend({}, Collapse.DEFAULTS, $this.data(), typeof option=='object'&&option) if(!data&&options.toggle&&/show|hide/.test(option)) options.toggle=false if(!data) $this.data('bs.collapse', (data=new Collapse(this, options))) if(typeof option=='string') data[option]() }) } var old=$.fn.collapse $.fn.collapse=Plugin $.fn.collapse.Constructor=Collapse $.fn.collapse.noConflict=function (){ $.fn.collapse=old return this } $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e){ var $this=$(this) if(!$this.attr('data-target')) e.preventDefault() var $target=getTargetFromTrigger($this) var data=$target.data('bs.collapse') var option=data ? 'toggle':$this.data() Plugin.call($target, option) }) }(jQuery); +function ($){ 'use strict'; var backdrop='.dropdown-backdrop' var toggle='[data-toggle="dropdown"]' var Dropdown=function (element){ $(element).on('click.bs.dropdown', this.toggle) } Dropdown.VERSION='3.3.4' Dropdown.prototype.toggle=function (e){ var $this=$(this) if($this.is('.disabled, :disabled')) return var $parent=getParent($this) var isActive=$parent.hasClass('open') clearMenus() if(!isActive){ if('ontouchstart' in document.documentElement&&!$parent.closest('.navbar-nav').length){ $('